/**
 * @author prairial
 */

function appendRow(tableID, value) {
	var table = document.getElementById(tableID);
	var no = table.rows.length;
	var row = table.insertRow(no);
	row.insertCell(0);
	row.cells[0].innerHTML = '<input type="button" value="删除该行" onclick="removeRow(\'' + tableID + '\', this)" />';
	if (value != null) putCellFront(row, value);
	return row;
}

function putCellFront(row, cell){
	row.insertCell(0);
	row.cells[0].innerHTML = cell;
}


function removeRow(tableID, src){
	document.getElementById(tableID).deleteRow(src.parentElement.parentElement.rowIndex);
}















